package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.User;
import cn.wolfcode.trip.base.query.QueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

public interface IUserService {

    void saveOrUpdate(User u);

    /**
     * 用户注册
     * @param u
     * @return
     */
    void regist(User u);

    /**
     * 用户登录
     * @param email
     * @param password
     * @return
     */
    User login(String email, String password);

    PageInfo<User> query(QueryObject qo);
    //查询当前用户的信息
    User get(Long id);

    /**
     * 收藏功能
     * @param userId
     * @param newId
     */
    void insertRelationWithNew(Long userId, Long newId);
}
